﻿Public Class frmResults
    Dim lsTables As New List(Of String)
    Private Sub frmResults_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        lsTables.Clear()
        For Each dt As DataTable In ds.Tables
            If Not dt Is Nothing AndAlso dt.Rows.Count > 0 Then
                If dt.Columns.Contains("Ratio") Then
                    dt.Columns.Remove("Ratio")
                End If
                lsTables.Add(dt.TableName)
            End If
        Next

        cboStep.DataSource = lsTables
        cboStep.SelectedIndex = cboStep.Items.Count - 1
    End Sub

    Private Sub cboStep_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboStep.SelectedIndexChanged
        dgvResults.DataSource = ds.Tables(cboStep.SelectedItem)
    End Sub
End Class